import Vue from 'vue'
import Router from 'vue-router'

const _import = require('./_import_' + process.env.NODE_ENV);
Vue.use(Router);

// require.context(url,bool,reg) url查找路径 bool是否查找子目录 reg正则表达式

export default new Router({
  // base: '/',
  routes: [
    {
      path: '/',
      name: 'Index',
      component: _import('init'),
      meta: {
        title:'首页'
      }
    },{
      path: '/home',
      name: 'home',
      component: _import('home'),
      meta: {
        title: '首页'
      }
    },{
      path: '/profile',
      name: 'profile',
      component: _import('project/profile/profile'),
      meta: {
        title: '我的档案'
      }
    },{
      path: '/term',
      name: 'term',
      component: _import('project/TermVision'),
      meta: {
        title: '第1学期设想'
      }
    }
  ]
})
